﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using PH.Model.Analyses;
using PH.Model.Analyses.Schools;
using PH.Data.Analyses;
namespace PH.Logic.Analyses
{
    public class SchoolLogic
    {
        /// <summary>
        /// 按班级分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4ClassCollection GetS4Class(AnalysisQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Class(sea);
            return RSCommand.GetRS4Class(sea);
        }
        /// <summary>
        /// 按性别分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4SexCollection GetS4Sex(AnalysisQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Sex(sea);
            return RSCommand.GetRS4Sex(sea);
        }
        /// <summary>
        /// 按年级分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4GradeCollection GetS4Grade(AnalysisQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Grade(sea);
            return RSCommand.GetRS4Grade(sea);
        }
        /// <summary>
        /// 按老师分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4TeacherCollection GetS4Teacher(AnalysisQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Teacher(sea);
            return RSCommand.GetRS4Teacher(sea);
        }
        /// <summary>
        /// 分析样品采集总进度
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4SampleGroupCollection GetS4SampleGroup(S4SampleQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4SampleGroup(sea);
            return RSCommand.GetRS4SampleGroup(sea);
        }
        /// <summary>
        /// 分析样品采集进度明细
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4SampleCollection GetS4Sample(S4SampleQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Sample(sea);
            return RSCommand.GetRS4Sample(sea);
        }
        /// <summary>
        /// 学生个人数据
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4StudentCollection GetS4Student(S4StudentQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Student(sea);
            return RSCommand.GetRS4Student(sea);
        }
        public static S4StudentCollection GetS4Student(string studentno,bool history)
        {
            if (history)
                return PSCommand.GetPS4Student(studentno);
            return RSCommand.GetRS4Student(studentno);
        }
        /// <summary>
        /// 按项目分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static S4SubjectCollection GetS4Subject(AnalysisQuery sea)
        {
            if (sea.History)
                return PSCommand.GetPS4Subject(sea);
            return RSCommand.GetRS4Subject(sea);
        }
    }
}
